package com.esoon.service.impl;

import com.esoon.dao.CsrAgentDao;
import com.esoon.service.CsrAgentService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @ClassName CsrAgentServiceImpl
 * @Description TODO
 * @Author 2020/9/28 13:33
 * @Version 1.0
 **/
@Service("CsrAgentServiceImpl")
public class CsrAgentServiceImpl implements CsrAgentService {

    private static final Logger logger;

    static {
        logger = LoggerFactory.getLogger(CsrAgentServiceImpl.class);
    }

    @Resource
    private CsrAgentDao csrAgentDao;
    @Override
    public String selectLastAgent(String phone,String tenantCode) {
        try {
          return  csrAgentDao.selectLastAgent(phone,tenantCode);
        }catch (Exception e){
            logger.error(e.toString());
            return "500";
        }

    }
}
